
.PHONY:ALL
ALL: httpserverd CGI
httpserverd:Main.cc
	g++ -o $@ $^ -std=c++11 -lpthread
CGI:
	#进入cgiprogram目录,编译生成所有该目录下的cgi程序,然后回退到上一层目录
	cd ./cgiprogram;\
		make;\
		cd -;
.PHONY:clean
clean:
	rm -f httpserverd
	#rm -rf output
	#进入到cgi目录,然后清理所有cgi程序,然后回退到上一层目录
	cd ./cgiprogram ;\
		make clean;\
		cd -;
.PHONY:output
output:
	#mkdir -p output
	#cp -rf wwwroot output
	cp httpserverd output
	cp ./cgiprogram/mysql_login output/wwwroot/blog/blog_cgi
	cp ./cgiprogram/mysql_register output/wwwroot/blog/blog_cgi
	cp ./cgiprogram/mysql_blogs output/wwwroot/blog/blog_cgi
	cp ./cgiprogram/mysql_detel output/wwwroot/blog/blog_cgi
	cp ./cgiprogram/mysql_create output/wwwroot/blog/blog_cgi

	


	